import React,{Component} from 'react'
import {connect} from 'react-redux'
import {withRouter} from 'react-router-dom'
import {
    DetailWrapper,
    Header,
    Content
} from './style'


class Index extends Component{
    render(){
        return (
            <DetailWrapper>
                <Header>{this.props.title}</Header>
                <Content dangerouslySetInnerHTML={{__html:this.props.content }}>
                </Content>
            </DetailWrapper>
        )
    }
}
const mapState = (state) => {
    return {
        title:state.getIn(['detail','title']),
        content:state.getIn(['detail','content'])
    }
}

export default connect(mapState,null)(withRouter(Index))